package chapter14;

import java.util.Arrays;
import java.util.List;

/**
 * Created by Caesar on 2016/2/26.
 */
abstract class Shape {
    void draw() { System.out.println(this + ".draw()"); }
    abstract public String toString();
}

class Circle extends Shape {
    public String toString() { return "Circle"; }
}

class Square extends Shape {
    public String toString() { return "Square"; }
}

class Triangle extends Shape {
    public String toString() { return "Triangle"; }
}

public class Shapes {
    public static void main(String[] args) {
        Shape sh = new Square();
        System.out.println(sh instanceof Triangle);
    }
}
